<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Feed extends CI_Controller {

	function __construct()
	{
		parent::__construct();
		
	}
	
  /*      function index() {
            $this->feed_list();
        }

        function feed_list() {
            $this->load->view('view_rss');
          }

         
       function _feed_init() {
        $this->load->library('simplepie');  //This is all you need to initialise a library in CodeIgniter
        $this->simplepie->set_cache_location('/tmp/');  //Change this to any temp directory that works for you
        $this->simplepie->set_feed_url('mobiforge.com/rss.xml');
        $this->simplepie->init();
      }
      
      
       function _get_items($offset, $amount) {
    $this->load->helper('url'); // useful to check, parse and clean URLs
    $blog_items = $this->simplepie->get_items($offset, $amount);  //load $amount RSS items starting from $offset
    $count = 0;
    //Loop through the RSS items to create a nice associative array for display in a view
    foreach($blog_items as $item) {
      $data['blog_items'][$count]['title'] = $item->get_title();
      $data['blog_items'][$count]['author'] = $item->get_author()->get_name();
      $data['blog_items'][$count]['local_date'] = $item->get_local_date();
      $data['blog_items'][$count]['content'] = $item->get_content();
      $data['blog_items'][$count]['permalink'] = $item->get_permalink();
      $count++;
    }
    return $data;
  }*/
}